Repository navigation
Add open/close/stop_tonneau to TeslemetryVehicle - #185
Merged
Merged
Conversation
Mirror the signed Commands names via closure(tonneau=...) so VehicleRouter can route tonneau commands to Bluetooth and fall back to the cloud.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VehicleRouter routes a call to Bluetooth only when both backends expose the method. The signed
Commandsclass hasopen_tonneau/close_tonneau/stop_tonneau, butTeslemetryVehicleonly hadclosure(tonneau=...), so tonneau always went to the cloud and Home Assistant needed a hand-built router.This adds the three methods to
TeslemetryVehicle, each callingclosure(tonneau=...), with the same signatures and return type as the signed class.closureand the Bluetooth code are unchanged.Tests: request path and body for each method, plus a
VehicleRoutertest showing Bluetooth is preferred and the cloud is used on failure. No release.